package org.telegram.bot.domain;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

/**
 * 入群验证对象 bot_chat_verify
 *
 * @author wyx
 * @date 2024-11-21
 */
@Data
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = true)
@TableName("bot_chat_verify")
public class BotChatVerify extends BaseEntity
{
    private static final long serialVersionUID = 1L;
    public static String AUTO_PREMIUM_CLOSE = "0";
    public static String AUTO_PREMIUM_PASS = "1";
    public static String AUTO_PREMIUM_REFUSAL = "2";
    
    
    /** ID */
    @TableId("id")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long id;

    /** 群组ID */
    @Excel(name = "群组ID")
    private Long chatId;

    /** 消息文本 */
    @Excel(name = "消息文本")
    @TableField(value = "content", condition = SqlCondition.LIKE)
    private String content;

    /** 验证方式 */
    @Excel(name = "验证方式")
    private String type;

    /** 超时时间(秒) */
    @Excel(name = "超时时间(秒)")
    private Long timeOut;

    /** 删除验证消息(秒) */
    @Excel(name = "删除验证消息(秒)")
    private Long delMsgTime;

    /** 封禁时长 */
    @Excel(name = "封禁时长")
    private Integer banTime;

    /** Premium自动通过 */
    @Excel(name = "Premium自动通过")
    private String autoPremium;

    /** 显示顺序 */
    private Integer orderNum;

    /** 状态（0正常 1停用） */
    @Excel(name = "状态", readConverterExp = "0=正常,1=停用")
    private String status;

    /** 删除标志（0代表存在 1代表删除） */
    private String delFlag;

    /** 创建者Id */
    @TableField(fill = FieldFill.INSERT)
    private Long createById;


    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("chatId", getChatId())
            .append("content", getContent())
            .append("type", getType())
            .append("timeOut", getTimeOut())
            .append("delMsgTime", getDelMsgTime())
            .append("banTime", getBanTime())
            .append("autoPremium", getAutoPremium())
            .append("remark", getRemark())
            .append("orderNum", getOrderNum())
            .append("status", getStatus())
            .append("delFlag", getDelFlag())
            .append("createBy", getCreateBy())
            .append("createById", getCreateById())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .toString();
    }
}
